module.exports = class extends think.Model {
  queryAllData() {
    return this.field('id,title').where({
      status: 1
    }).order('sort desc').select();
  }
  frozenById(id) {
    return this.where({
      id
    }).update({
      status: 0,
      modify_time: this.datetime()
    });
  }
  /**
   *  冻结
   */
  unfrozenById(id) {
    return this.where({
      id
    }).update({
      status: 1,
      modify_time: this.datetime()
    });
  }
};
